package com.example.xpvideo.service.serviceImpl;

import com.example.xpvideo.entity.LsBargainLaunch;
import com.example.xpvideo.mapper.LsBargainLaunchMapper;
import com.example.xpvideo.service.LsBargainLaunchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 砍价记录表(LsBargainLaunch)Service层
 *
 * @author 
 * @since 2021-09-23 12:00:32
 */
@Service
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public class LsBargainLaunchServiceImpl implements LsBargainLaunchService {
        @Autowired
        private LsBargainLaunchMapper lsBargainLaunchMapper;


 /**
     * 通过ID和其他条件查询单条数据
     *
     * @param lsBargainLaunch 实例对象
     * @return 实例对象
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
     public LsBargainLaunch queryLsBargainLaunchLimit1(LsBargainLaunch lsBargainLaunch){
     return  lsBargainLaunchMapper.queryLsBargainLaunchLimit1( lsBargainLaunch);
     }
     
 /**
     * 查询指定行数据
     * @param lsBargainLaunch 实例对象
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
  public   List<LsBargainLaunch> queryAllLsBargainLaunchByLimit( LsBargainLaunch lsBargainLaunch, Integer offset,  Integer limit){
   return lsBargainLaunchMapper.queryAllLsBargainLaunchByLimit(lsBargainLaunch, offset,limit);
  }

  /**
     * 查询数据条数
     * @return 条数
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public int countAllLsBargainLaunch(LsBargainLaunch lsBargainLaunch){
   return lsBargainLaunchMapper.countAllLsBargainLaunch( lsBargainLaunch);
   }
   /**
     * 通过实体作为筛选条件查询
     *
     * @param lsBargainLaunch 实例对象
     * @return 对象列表
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public List<LsBargainLaunch> queryAllLsBargainLaunch(LsBargainLaunch lsBargainLaunch){
   return lsBargainLaunchMapper.queryAllLsBargainLaunch(lsBargainLaunch);
   }
  /**
     * 新增数据
     *
     * @param lsBargainLaunch 实例对象
     * @return 影响行数
     */
     @Override
   @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
    public int insertLsBargainLaunch(LsBargainLaunch lsBargainLaunch){
    return  lsBargainLaunchMapper.insertLsBargainLaunch( lsBargainLaunch);
    }
  /**
     * 修改数据
     *
     * @param lsBargainLaunch 实例对象
     * @return 影响行数
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
     public  int updateLsBargainLaunch(LsBargainLaunch lsBargainLaunch){
         return lsBargainLaunchMapper.updateLsBargainLaunch( lsBargainLaunch);
     }

    /**
     * 通过主键删除数据
     * @param id 主键
     * @return 影响行数
     */
      @Override
  @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public  int deleteLsBargainLaunchById(Integer id){
   return  lsBargainLaunchMapper.deleteLsBargainLaunchById( id);
   }
     /**
     * 通过主键列表删除，列表长度不能为0
     * @param list 集合
     * @return 条数
     */
      @Override
  @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
  public  int deleteLsBargainLaunchByIds( List<Integer> list){
    return  lsBargainLaunchMapper.deleteLsBargainLaunchByIds(  list);
  }
    
       /**
     * 通过主键修改实体列表，列表长度不能为0，注意：当实体属性为null时，对应的列也会别更新为null
     * @param list 集合
     * @return 条数
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public int updateLsBargainLaunchBatch( List<LsBargainLaunch> list){
   return  lsBargainLaunchMapper.updateLsBargainLaunchBatch(list);
   }
    /**
     * 批量其他列,除主键以外的列，列表长度不能为0,字段是空的就置为null
     * @param list 集合
     * @return 条数
     */
      @Override
  @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
 public   int insertLsBargainLaunchBatch( List<LsBargainLaunch> list){
 return lsBargainLaunchMapper.insertLsBargainLaunchBatch( list);
 }
      /**
     * 通过实体非空属性删除
     * @param lsBargainLaunch  实体
     * @return 条数
     */
        @Override
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
  public   int deleteLsBargainLaunchByEntity( LsBargainLaunch lsBargainLaunch){
  return  lsBargainLaunchMapper.deleteLsBargainLaunchByEntity(  lsBargainLaunch);
  }
    /**
     * 通过实体不为空的属性作为筛选条件查询列表
     * @param lsBargainLaunch  实体
     * @return list
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public  List<LsBargainLaunch> listLsBargainLaunchByEntity(LsBargainLaunch lsBargainLaunch){
   return lsBargainLaunchMapper.listLsBargainLaunchByEntity( lsBargainLaunch);
   }

 /**
     * 新增实体属性不为null的列
     * @param lsBargainLaunch  实体
     * @return 条数
     */
       @Override
 @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
   public  int insertLsBargainLaunchSelect( LsBargainLaunch lsBargainLaunch){
      return lsBargainLaunchMapper.insertLsBargainLaunchSelect( lsBargainLaunch);

   }
   
      /**
     * 批量新增新增实体属性不为null的列
     * @param list  实体
     * @return 条数
     */
        @Override
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
  public  int insertLsBargainLaunchListSelect( List<LsBargainLaunch> list){

     return lsBargainLaunchMapper.insertLsBargainLaunchListSelect( list);
      }
     /**
     * 通过实体不为空的属性作为筛选条件查询单个
     * @param lsBargainLaunch  实体
     * @return 单个
     */
     @Override
   @Transactional(rollbackFor = {RuntimeException.class, Exception.class})
    public  LsBargainLaunch getLsBargainLaunchByEntity(LsBargainLaunch lsBargainLaunch){
     return  lsBargainLaunchMapper.getLsBargainLaunchByEntity(lsBargainLaunch);
    }

}

